package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * @author: wufeng
 * @date: 2018/8/17 9:23
 * @desrcption: 获取现有流程对象
 */
@Getter
@Setter
@ToString
public class ProcessGetDTO extends BaseDTO {

    private static final long serialVersionUID = 3336336099275381955L;

    @NotNull(message = "{dto.msg.processGet.appId.NotNull}")
    private Long appId;

    @NotNull(message = "{dto.msg.processGet.formId.NotNull}")
    private Long formId;

    /**
     * 是否是saas 1：saas  2：paas
     */
    @DecimalMin(value = "1", message = "{dto.msg.processGet.saasMark.DecimalMin}")
    @DecimalMax(value = "2", message = "{dto.msg.processGet.saasMark.DecimalMax}")
    @NotNull(message = "{dto.msg.processGet.saasMark.NotNull}")
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer saasMark;

    /**
     * saas业务类型
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer businessType;

    /**
     * 流程模板id
     */
    @NotNull(message = "{dto.msg.processGet.processTemplateId.NotNull}")
    private Long processTemplateId;

    private Integer del;
    @DecimalMin(value = "1", message = "{dto.msg.processGet.type.DecimalMin}")
    @DecimalMax(value = "2", message = "{dto.msg.processGet.type.DecimalMax}")
    @NotNull(message = "{dto.msg.processGet.type.NotNull}")
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer type;

    /**
     * 流程类型(历史3  启用2  设计1)
     */
    private Integer versionType;
    public ProcessGetDTO(){
        del = 0;
    }
}
